<?php
include "gear.php";
class gearWebController extends gearController
{

    public function __construct()
    {
        parent::__construct('show');
        $this->in_user();
        $this->printResult = TRUE;
    }
    
    /*
     * 装备列表（包含新闻）
     */
    public function dogearList(){
        // 数据类型及排序
        $types = array('all', 'gearNews', 'gearSet', 'gearEval', 'gearHot', 'gearNew');
        $orders = array('new', 'hot', 'best');

        $type = common::request('type', 'G', 'all');
        $order = common::request('order','G', 'new');
        $page = common::request('page', 'G', 1);
        !in_array($type, $types) && $type = $types[0];
        !in_array($order, $orders) && $order = $orders[0];
        (!is_numeric($page) || $page < 1 || $page > 100) && $page = 1;

        $this->result['result'] = $this->load('gear')->getGearListByType($type, $order, $page, 10);
    }

}